import AuthManager from "../components/systemManager/AuthManager";
import ResourceManager from "../components/systemManager/ResourceManager";
import UserManager from "../components/systemManager/UserManager";
import Dictionary from "../components/systemManager/Dictionary";
import SystemConstants from "../components/systemOperation/SystemConstants";
import TinyEditor from "../components/TinyEditor";


export default [
    {
        path: "/",
        redirect: "/dashboard"
    },
    {
        path: "/",
        component: () =>
            import(/* webpackChunkName: "home" */ "../views/Home.vue"),
        meta: { title: "自述文件" },
        children: [
            {
                path: "/dashboard",
                component: () =>
                    import(
                        /* webpackChunkName: "dashboard" */ "../components/Dashboard.vue"
                        ),
                meta: { title: "系统首页" }
            },
            {
                path: "/icon",
                component: () =>
                    import(/* webpackChunkName: "icon" */ "../components/Icon.vue"),
                meta: { title: "自定义图标" }
            },
            {
                path: "/auth-manager",
                component: AuthManager,
                meta: { title: "权限管理" }
            },
            {
                path: "/resource-manager",
                component: ResourceManager,
                meta: { title: "资源管理" }
            },
            {
                path: "/user-manager",
                component: UserManager,
                meta: { title: "用户管理" }
            },
            {
                path: "/dictionary",
                component: Dictionary,
                meta: { title: "系统字典" }
            },
            {
                path: "/system-constants",
                component: SystemConstants,
                meta: { title: "系统常量" }
            },
            {
                path: "/table",
                component: () =>
                    import(
                        /* webpackChunkName: "table" */ "../components/BaseTable.vue"
                        ),
                meta: { title: "基础表格" }
            },
            {
                path: "/tabs",
                component: () =>
                    import(/* webpackChunkName: "tabs" */ "../components/Tabs.vue"),
                meta: { title: "tab选项卡" }
            },
            {
                path: "/form",
                component: () =>
                    import(/* webpackChunkName: "form" */ "../components/BaseForm.vue"),
                meta: { title: "基本表单" }
            },
            {
                // 富文本编辑器组件
                path: "/editor",
                component: () =>
                    import(
                        /* webpackChunkName: "editor" */ "../components/VueEditor.vue"
                        ),
                meta: { title: "富文本编辑器" }
            },
            {
                // markdown组件
                path: "/tiny-editor",
                component: TinyEditor,
                meta: { title: "tinymce编辑器" }
            },
            {
                // markdown组件
                path: "/markdown",
                component: () =>
                    import(
                        /* webpackChunkName: "markdown" */ "../components/Markdown.vue"
                        ),
                meta: { title: "markdown编辑器" }
            },
            {
                // 图片上传组件
                path: "/upload",
                component: () =>
                    import(/* webpackChunkName: "upload" */ "../components/Upload.vue"),
                meta: { title: "文件上传" }
            },
            {
                // vue-schart组件
                path: "/charts",
                component: () =>
                    import(
                        /* webpackChunkName: "chart" */ "../components/BaseCharts.vue"
                        ),
                meta: { title: "schart图表" }
            },
            {
                // 拖拽列表组件
                path: "/drag",
                component: () =>
                    import(/* webpackChunkName: "drag" */ "../components/DragList.vue"),
                meta: { title: "拖拽列表" }
            },
            {
                // 拖拽Dialog组件
                path: "/dialog",
                component: () =>
                    import(
                        /* webpackChunkName: "dragdialog" */ "../components/DragDialog.vue"
                        ),
                meta: { title: "拖拽弹框" }
            },
            {
                // 国际化组件
                path: "/i18n",
                component: () =>
                    import(/* webpackChunkName: "i18n" */ "../components/I18n.vue"),
                meta: { title: "国际化" }
            },
            {
                // 权限页面
                path: "/permission",
                component: () =>
                    import(
                        /* webpackChunkName: "permission" */ "../components/Permission.vue"
                        ),
                meta: { title: "权限测试", permission: true }
            },
            {
                path: "/404",
                component: () =>
                    import(/* webpackChunkName: "404" */ "../components/404.vue"),
                meta: { title: "404" }
            },
            {
                path: "/403",
                component: () =>
                    import(/* webpackChunkName: "403" */ "../components/403.vue"),
                meta: { title: "403" }
            },
            {
                path: "/donate",
                component: () =>
                    import(/* webpackChunkName: "donate" */ "../components/Donate.vue"),
                meta: { title: "支持作者" }
            }
        ]
    },
    {
        path: "/login",
        component: () =>
            import(/* webpackChunkName: "login" */ "../components/Login.vue")
    },
    {
        path: "*",
        redirect: "/404"
    }
]
